import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from '@/assets/js/axios'
import resize from '@/assets/js/resize'
import FastClick  from 'fastclick'
import 'vant/lib/index.css'
//
import { Switch } from 'vant';
Vue.use(Switch);

//vant的toast插件
import Toast  from 'vant/lib/toast'
import 'vant/lib/toast/style'
Vue.use(Toast)

//图片查看器
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'

//ICON
import { Icon } from 'vant';
Vue.use(Icon);

//Tabbar
import { Tabbar, TabbarItem } from 'vant';

Vue.use(Tabbar);
Vue.use(TabbarItem);

//确认框
import Confirm from '@/components/confirm/index.js'
Vue.prototype.$confirm = Confirm.install

//注册金额格式化过滤器
import money from '@/assets/js/moneyFormat.js'
Vue.filter('money', money)

import '@/assets/css/reset.css'
import '@/assets/css/media.css'

resize(750, 100)
window.onresize = function(){
  resize(750, 100)
}
if ('addEventListener' in document) {
  document.addEventListener('DOMContentLoaded', function() {
    FastClick.attach(document.body);
  }, false)
}

Vue.prototype.$axios = axios
Vue.prototype.$bus = new Vue()

//本地测试用的uid
Vue.prototype.$uid = 1

Vue.use(preview)

Vue.config.productionTip = false

let app = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

export default app